package cn.zwx.member.svc.service.impl;

import cn.zwx.member.svc.domain.entity.MemberEntity;
import cn.zwx.member.svc.domain.entity.SignRewardEntity;
import cn.zwx.member.svc.mapper.SignRewardMapper;
import cn.zwx.member.svc.service.SignRewardService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author zhangwenxue
 */
@Service
public class SignRewardServiceImpl implements SignRewardService {

    @Resource
    private SignRewardMapper signRewardMapper;

    @Override
    public SignRewardEntity getSignReward(Integer day) {
        LambdaQueryWrapper<SignRewardEntity> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(SignRewardEntity::getSignDay,day);
        return signRewardMapper.selectOne(queryWrapper);
    }
}
